package com.dyw.service;

import com.dyw.Student;
import com.dyw.dao.StudentDao;

import java.util.List;

/**
 * @auther Devil
 * @create 2022-01-07-15:17
 */
public class studentServiceImpl implements studentService {

    //引用类型
    private StudentDao studentDao;

    //使用set注入赋值
    public void setStudentDao(StudentDao studentDao) {
        this.studentDao = studentDao;
    }

    @Override
    public int addStudent(Student student) {
        int nums = studentDao.insertStudent(student);
        return nums;
    }


    @Override
    public List<Student> queryStudent() {
        List<Student> myList = studentDao.selectStudents();
        return myList;
    }
}
